#!/bin/sh

set -e

if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
  # XXX: We should use the copy method instead once available.
  cp -a $DPKG_ROOT/test-conffile $DPKG_ROOT/test-conffile.diverted
  dpkg-divert --package pkg-conff-divert --no-rename \
              --divert /test-conffile.diverted --add /test-conffile
fi
